﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Demo.Controls
{
    public partial class SignalLamp : UserControl
    {
        Form form;
        public SignalLamp(Form form)
        {
            InitializeComponent();
            this.form = form;

        }

        private void button1_Click(object sender, EventArgs e)
        {
            perfectLamp.NormallyOpen();
            signalLamp1.NormallyOpen();
            signalLamp2.NormallyOpen();
            signalLamp3.NormallyOpen();
            signalLamp4.NormallyOpen();
            signalLamp5.NormallyOpen();
            signalLamp6.NormallyOpen();
            
           
        }

        private void button2_Click(object sender, EventArgs e)
        {
            perfectLamp.NormallyOff();
            signalLamp1.NormallyOff();
            signalLamp2.NormallyOff();
            signalLamp3.NormallyOff();
            signalLamp4.NormallyOff();
            signalLamp5.NormallyOff();
            signalLamp6.NormallyOff();

        }

        private void button3_Click(object sender, EventArgs e)
        {
            perfectLamp.StartBlink(); 
            signalLamp1.StartBlink();
            signalLamp2.StartBlink();
            signalLamp3.StartBlink();
            signalLamp4.StartBlink();
            signalLamp5.StartBlink();
            signalLamp6.StartBlink();
        }
    }
}
